@import '../../style/themes/index';
@import '../../style/mixins/index';


@link-prefix-cls: ~'@{cls-prefix}-link';

.@{link-prefix-cls} {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--f-text-color);
    text-decoration: none;
    cursor: pointer;

    a {
        color: inherit;
        text-decoration: inherit;
    }

    .icon {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 4px;
    }

    &.is-disabled {
        cursor: not-allowed;
        opacity: 0.7;
    }
    &.is-underline:not(.is-disabled):hover::after {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 0;
        border-bottom: 1px solid currentcolor;
        content: "";
    }

    &-type-default {
        color: var(--f-text-color);
        &:hover:not(.is-disabled) {
            color: var(--f-hover-color-base);
        }
    }

    &-type-primary {
        color: var(--f-primary-color);
        &:hover:not(.is-disabled) {
            color: var(--f-hover-color-base);
        }
    }

    &-type-success {
        color: var(--f-success-color);
        &:hover:not(.is-disabled) {
            color: var(--f-hover-success-text-color);
        }
    }

    &-type-warning {
        color: var(--f-warning-color);
        &:hover:not(.is-disabled) {
            color: var(--f-hover-warning-text-color);
        }
    }

    &-type-danger {
        color: var(--f-danger-color);
        &:hover:not(.is-disabled) {
            color: var(--f-hover-danger-text-color);
        }
    }

    &-size-middle {
        font-size: var(--f-font-size-base);
    }

    &-size-small {
        font-size: calc(var(--f-font-size-base) - 2px);
    }

    &-size-large {
        font-size: calc(var(--f-font-size-base) + 2px);
    }
}